package com.cqc.config;


import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ESConfig {

    @Bean
    public RestClient restClient() {
        // 创建 RestClient
        HttpHost httpHost1 = new HttpHost("39.105.6.205", 9200, "http");
        RestClient restClient = RestClient.builder(httpHost1).build();
        return restClient;
    }
}
